#pragma once
#include "typedefs.h"
#include <boost/shared_ptr.hpp>
#include <string>
using namespace std;
#define SHADER_VALID 1
#define SHADER_NULL 0
#define SHADER_ERROR 3
#define SHADER_LINKERROR 4
#define SHADER_UNLOADED 2
class BaseShaderProgram
{
protected:
	BaseShaderProgram(void);
public:
	virtual ~BaseShaderProgram(void);
	virtual string GetUniqueShaderName() = 0;
	virtual bool Initialize() = 0;
	virtual void DumpErrorLog();

public:
	bool IsValid();
	void Bind();
	void Unbind();

protected:
	virtual bool Initialize(string strVSFile, string strFSFile);
	virtual void Unload();
	virtual bool LoadShader(string strFile, uint shaderType, uint *nIDout);

private:
	boost::shared_ptr<int> m_validator;
protected:
	uint m_nProgramName;
};

